How Do I Specify Snap to Grid?

Set the HorizontalSnapSpecifier and the VerticalSnapSpecifier properties of the DiagramSurface. Use an instance of the SnapToIntervalSnapSpecifier, or use the SnapToIntervalExtension markup extension as shown in the QuickStart:

CopyXML
<ms:DiagramSurface HorizontalSnapSpecifier="{ms:SnapToInterval 10}" />

To customise snapping behaviour, implement the ISnapSpecifier interface.